function HyperLink(text, options) {
	this.text = text;

	if (options) {
		this.fn = options.fn;
		this.scope = options.scope;
		this.style = options.style;
	}

	if (this.fn && this.scope) {
		this.fn = this.fn.bind(this.scope);
	}
}

HyperLink.prototype = {
	onRender: function() {
		if (this.fn) {
			this.el.click(this.fn);
		}
	},

	render: function() {
		if (this.el) {
			return this.el;
		}
        var el = $('<a href="#" class="hyperlink">' + this.text + '</a></br>');

		if (this.style) {
			el.css(this.style);
		}

		this.el = el;
		return el;
	},

	setText: function(text) {
		this.text = text;
		if (this.el) {
			this.el.html(text);
		}
	}
};
